package com.jinxin.phonecloudmusic.myapplication.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.jinxin.phonecloudmusic.myapplication.R;
import com.jinxin.phonecloudmusic.myapplication.app.JxscApp;
import com.jinxin.phonecloudmusic.myapplication.entity.MusicBean.Artist;
import com.jinxin.phonecloudmusic.myapplication.entity.MusicBean.Song;
import com.squareup.picasso.Picasso;

import java.util.List;

import butterknife.BindView;

/**
 * Created by ZJ on 2017/10/16 0016.
 */

public class MusicSearchSingerAdapter extends QuickAdapter<Song>{
    public MusicSearchSingerAdapter(Context context, int res, List<Song> data) {
        super(context, res, data);
    }

    @Override
    public View getItemView(int position, View convertView, ViewHolder holder) {
        ImageView ivSearchSonger=holder.getView(R.id.iv_search_songer);
        TextView tvSearchSonger=holder.getView(R.id.tv_search_songer);
        Song song=data.get(position);
        //Picasso.with(JxscApp.getContext()).load(song.getArtistpic()).placeholder(R.drawable.background).error(R.drawable.background).into(ivSearchSonger);
        tvSearchSonger.setText(song.getArtistname());
        return convertView;
    }
}
